package com.sql.compare.dto;

import lombok.Data;

import java.io.Serializable;

@Data
public class ResultDTO<T> implements Serializable {
    private int code;
    private String message;
    private T data;

    public ResultDTO(Integer code,String message,T data){
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public ResultDTO<T> success(T data) {
        return new ResultDTO<T>(200, "success", data);
    }
}
